package com.his.dao.jpa;

import java.math.BigDecimal;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import com.his.pojos.jpa.HisTakedrug;

public interface MxjTakeDrugDAO extends CrudRepository<HisTakedrug, Long> {
	
	@Query("select qyNo from HisTakedrug where qyNo=:qyNo")
	public String inspectDrugId(@Param("qyNo")long qyNo);
	
	@Query("select max(qyNo) from HisTakedrug")
	public String findMaxDrugId();
	
	@Query("select ssNo from HisTakedrug where ssNo=:ssNo")
	public String inspectssNo(@Param("ssNo")BigDecimal ssNo);
	
	@Query("select qyNo from HisTakedrug where ssNo=:ssNo")
	public BigDecimal findqyNoByssNo(@Param("ssNo")BigDecimal ssNo);
}
